<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
    <xsl:param name="DOTNET2"/>
    

  
	<xsl:template match="Class"><xsl:variable name="Name" select="Name"/>
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace <xsl:value-of select="//HeaderInfo/ProjectName"/>.Web
{
    public partial class <xsl:value-of select="Name"/> : System.Web.UI.Page
    {
        protected void Page_Load ( object sender , EventArgs e )
        {
		if ( !IsPostBack )
		{
			DataBind ( );
		}
        }
	
	
	protected void Button1_Click ( object sender , EventArgs e )
        {
		<xsl:value-of select="//HeaderInfo/ProjectName"/>.Core.Domain.DataAccess.<xsl:value-of select="Name"/> dataObject = new <xsl:value-of select="//HeaderInfo/ProjectName"/>.Core.Domain.DataAccess.<xsl:value-of select="Name"/> ( );
		new <xsl:value-of select="//HeaderInfo/ProjectName"/>.Data.NHibernateDal.DataObjectFactory ( ).Get<xsl:value-of select="Name"/>DataObject ( ).Save ( dataObject );

		DataBind ( );
        }
	
	// Bind the datasource and return all rows
	void DataBind ( )
	{
		GridView1.DataSource = 
		new <xsl:value-of select="//HeaderInfo/ProjectName"/>.Data.NHibernateDal.DataObjectFactory ( ).Get<xsl:value-of select="Name"/>DataObject ( ).GetAll ( );
		GridView1.DataBind ( );
	}
    }
}


	</xsl:template>
</xsl:stylesheet>